{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Enrichment Plot"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "A function to plot step plots of cumulative counts."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "> from mlxtend.general_plotting import category_scatter"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Overview"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In enrichment plots, the y-axis can be interpreted as \"how many samples are less or equal to the corresponding x-axis label.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### References\n",
    "\n",
    "- -"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 - Enrichment Plots from Pandas DataFrames"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>X1</th>\n",
       "      <th>X2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1.1</td>\n",
       "      <td>1.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2.1</td>\n",
       "      <td>1.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3.1</td>\n",
       "      <td>2.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3.9</td>\n",
       "      <td>2.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    X1   X2\n",
       "0  1.1  1.5\n",
       "1  2.1  1.8\n",
       "2  3.1  2.1\n",
       "3  3.9  2.5"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "s1 = [1.1, 1.5]\n",
    "s2 = [2.1, 1.8]\n",
    "s3 = [3.1, 2.1]\n",
    "s4 = [3.9, 2.5]\n",
    "data = [s1, s2, s3, s4]\n",
    "df = pd.DataFrame(data, columns=['X1', 'X2'])\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Plotting the data where the categories are determined by the unique values in the label column `label_col`. The `x` and `y` values are simply the column names of the DataFrame that we want to plot."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAggAAAFkCAYAAABFIsPfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAAPYQAAD2EBqD+naQAAIABJREFUeJzt3X10leWd7vHrhxY1gn1DBdqm7ZyeWlHHNnGcyVi1Zbpo\nD2vN085a7SC2zkzQ5UISqiChM1YbKIfW0A7iANV4TqQW2w3WasCKgg7QMQ4ztGz7ghJaC04Yj7RE\nHQKmAq33+SOBYefmRfKyfzvc389ae83kzpPk2vcVya97P/vZFkIQAADA4YZ4BwAAAKWHAQEAAEQY\nEAAAQIQBAQAARBgQAABAhAEBAABEGBAAAECEAQEAAEQYEAAAQIQBAQAARNwHBDOrN7M3etye884F\nAEDKTvUO0G2zpL+QZN0f/94xCwAAySuVAeH3IYRd3iEAAEAX96cYuv1PM3vRzH5tZveb2Xu8AwEA\nkDLzfrtnM/ukpGGStkoaJWmWpNGSLgwhvHaE498p6ZOSXpD0etGCAgAw+J0u6X2SVocQXj7Wge4D\nQk9m9lZJ/yFpWghhyRE+f7Wk7xY9GAAAJ4/PhxC+d6wDSuUchENCCLvN7JeSPnCUQ16QpPvvv1/n\nn39+0X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qaaIt3nlSZ2cuSZoQQlnhnSYWZDZO0SdINkm6T9EwIYbpvqjTxCAJQmt6mrkdyXvEOkiIz\nG2JmV6nreiwbvPMkZrGkR0IIa72DpK4kroMA4L91X0l0gaSWEMJz3nlSYmYXqmsgOF3SHkl/1f0W\n9CiC7qHsw5Iu8c4CBgSgFH1L0hhJl3kHSVCrpIslvVXSZyV9x8yuYEgYeGb2bnUNxp8IIRzwzgPO\nQcARcA6CHzNbJOkvJV0eQmjzzpM6M3tC0vMhhBu8s5zszOzTkh5S15v3WffyKep6qu0Pkk4L/MEq\nKh5BAEpE93DwaUlXMhyUjCGSTvMOkYgnJV3UY+3bkrZIup3hoPgYECBJMrMzJX1A/z25/5GZXSzp\nlRDCDr9kaTCzb0maKCmT9JqZHXz7890hBN7WvAjM7GuSHlPXO8kOV9fbyl8paZxnrlSEEF6TVHDO\njZm9JunlEMIWn1RpY0DAQZdIWqeuh/OCpH/sXr9P0iSvUAmZrK59X99jvVrSd4qeJk3nqOv3fZSk\n3ZJ+LmkcZ9O74lEDR5yDAAAAIlwHAQAARBgQAABAhAEBAABEGBAAAECEAQEAAEQYEAAAQIQBAQAA\nRBgQAABAhAEBAABEGBAAAECEAQEAAET+P7A6Cs7jBBb9AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10607b198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "from mlxtend.plotting import enrichment_plot\n",
    "\n",
    "ax = enrichment_plot(df, legend_loc='upper left')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## API"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "## enrichment_plot\n",
      "\n",
      "*enrichment_plot(df, colors='bgrkcy', markers=' ', linestyles='-', alpha=0.5, lw=2, where='post', grid=True, count_label='Count', xlim='auto', ylim='auto', invert_axes=False, legend_loc='best', ax=None)*\n",
      "\n",
      "Plot stacked barplots\n",
      "\n",
      "**Parameters**\n",
      "\n",
      "- `df` : pandas.DataFrame\n",
      "\n",
      "    A pandas DataFrame where columns represent the different categories.\n",
      "    colors: str (default: 'bgrcky')\n",
      "    The colors of the bars.\n",
      "\n",
      "- `markers` : str (default: ' ')\n",
      "\n",
      "    Matplotlib markerstyles, e.g,\n",
      "    'sov' for square,circle, and triangle markers.\n",
      "\n",
      "- `linestyles` : str (default: '-')\n",
      "\n",
      "    Matplotlib linestyles, e.g.,\n",
      "    '-,--' to cycle normal and dashed lines. Note\n",
      "    that the different linestyles need to be separated by commas.\n",
      "\n",
      "- `alpha` : float (default: 0.5)\n",
      "\n",
      "    Transparency level from 0.0 to 1.0.\n",
      "\n",
      "- `lw` : int or float (default: 2)\n",
      "\n",
      "    Linewidth parameter.\n",
      "\n",
      "- `where` : {'post', 'pre', 'mid'} (default: 'post')\n",
      "\n",
      "    Starting location of the steps.\n",
      "\n",
      "- `grid` : bool (default: `True`)\n",
      "\n",
      "    Plots a grid if True.\n",
      "\n",
      "- `count_label` : str (default: 'Count')\n",
      "\n",
      "    Label for the \"Count\"-axis.\n",
      "\n",
      "- `xlim` : 'auto' or array-like [min, max] (default: 'auto')\n",
      "\n",
      "    Min and maximum position of the x-axis range.\n",
      "\n",
      "- `ylim` : 'auto' or array-like [min, max] (default: 'auto')\n",
      "\n",
      "    Min and maximum position of the y-axis range.\n",
      "\n",
      "- `invert_axes` : bool (default: False)\n",
      "\n",
      "    Plots count on the x-axis if True.\n",
      "\n",
      "- `legend_loc` : str (default: 'best')\n",
      "\n",
      "    Location of the plot legend\n",
      "    {best, upper left, upper right, lower left, lower right}\n",
      "    No legend if legend_loc=False\n",
      "\n",
      "- `ax` : matplotlib axis, optional (default: None)\n",
      "\n",
      "    Use this axis for plotting or make a new one otherwise\n",
      "\n",
      "**Returns**\n",
      "\n",
      "- `ax` : matplotlib axis\n",
      "\n",
      "\n",
      "**Examples**\n",
      "\n",
      "For usage examples, please see\n",
      "    [http://rasbt.github.io/mlxtend/user_guide/plotting/enrichment_plot/](http://rasbt.github.io/mlxtend/user_guide/plotting/enrichment_plot/)\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "with open('../../api_modules/mlxtend.plotting/enrichment_plot.md', 'r') as f:\n",
    "    print(f.read())"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
